package com.wlsk.license.controller.plate;

import com.wlsk.license.common.result.PlateResult;
import com.wlsk.license.common.result.Result;
import com.wlsk.license.dto.request.CharteredReviewReqDto;
import com.wlsk.license.dto.request.PlateBaseReqDto;
import com.wlsk.license.service.ICharteredReviewService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description: 包车牌授权验证
 * @author: liuzhangbin
 * @date: 2025/8/27
 */
@Slf4j
@RestController
@AllArgsConstructor
@Api(tags = "包车牌审核")
@RequestMapping("/plate/approve")
public class PlateReviewController {

    @Autowired
    private ICharteredReviewService charteredReviewService;

    @ApiOperation(value = "包车牌审核结果回调")
    @PostMapping("/back/charteredReview.interface")
    public PlateResult<String> charteredReview(@RequestBody CharteredReviewReqDto reqDto) {
        log.info("包车牌审核结果回调:{}", reqDto);
        return charteredReviewService.createCharteredReview(reqDto.getData());
    }
}
